package com.wanmait.schedule.mapper;

import com.wanmait.schedule.entity.NoticeRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wanmait.schedule.entity.Student;
import com.wanmait.schedule.entity.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 通知查看记录表 Mapper 接口
 * </p>
 *
 * @author wanmait
 * @since 2022-12-05
 */
public interface NoticeRecordMapper extends BaseMapper<NoticeRecord> {
    /**
     * 添加学生
     */
    void insertStudent(@Param("student") List<Integer> studentId, @Param("noticeId") Integer noticeId);

    void insertTeacher(@Param("teacher")List<Integer> teacherId,@Param("noticeId") Integer noticeId);

    List<NoticeRecord> findNoticeById(@Param("id") Integer id,@Param("status") Integer status);

    Integer noReader(@Param("id") Integer id,@Param("status") Integer status);

    void delete(@Param("id") Integer id);

    List<Student> findIdByStudent(Integer id);

    List<Teacher> findIdByTeacher(Integer id);

    List<NoticeRecord> findByStudent(Integer id);
    List<NoticeRecord> findByTeacher(Integer id);
    Integer delNoticeStudent(NoticeRecord noticeRecord);

    Integer delNoticeTeacher(NoticeRecord noticeRecord);


}
